{extend name="base/common"}

{block name="style"}
<style>
    .shadow{width: 100%;height: 100%;position: absolute;left: 0;top: 0;background: rgba(0,0,0,0.4);z-index: 88;}
    input[name='jg'],input[name='xt'],input[name='my']{width:40px;text-align: center;margin:0 10px;}
    input[name='up'],input[name='float'],input[name='low'],input[name='work'],input[name='style'],input[name='area'],input[name='twin'],input[name='three'],input[name='develop'],input[name='other'] {width:40px;text-align: center;margin:0 10px;}
    .minus,.add,.add1,.add2 b,.add4 b,.add5 b,.add6 b,.add7 b, .add8 b , .add9 b{cursor: pointer;display: inline-block;
        width: 20px;
        text-align: center;}
    .table tr th,.table tr td{
        text-align: center;
    }
    .table tr th:nth-child(2),.table tr td:nth-child(2){
        text-align: left;
    }
</style>

{/block}

{block name="page-header"}
<div class="row wrapper border-bottom white-bg page-heading">
    <div class="col-lg-10">
        <h2>测试排名</h2>
        <ol class="breadcrumb">
            <li>
                <a href="{:Url('Test/index')}">测试列表</a>
            </li>
            <li class="active">
                <strong>排行榜</strong>
            </li>
        </ol>
    </div>
    <div class="col-lg-2">
    </div>
</div>
{/block}

{block name="main"}
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-lg-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5 style="color: green">平均分：{$sum}</h5>
                    <form method="get" action="">
                        <div class="col-sm-4">
                            <div class="input-group">
                                <input type="text" placeholder="输入学校" class="input-sm form-control" name="name" value="{notempty name='Think.get.name'}{$Think.get.name}{/notempty}">
                                <input type="hidden"  name="code" id="party" value="{$code}">
                            <span class="input-group-btn">
                                <button type="submit" class="btn btn-sm btn-primary">查询</button>
                            </span>
                            </div>
                        </div></form>
                    <div class="ibox-tools">
                        <a data-toggle="modal" class="btn btn-sm btn-primary" href="{:Url('Test/edit?code='.$code)}">成绩录入</a>
                        <a href="javascript:window.history.go(-1);" class="btn btn-white btn-sm"><i class="fa fa-reply"></i> 返回</a>
                    </div>
                </div>
                <div class="ibox-content">
                    <div class="table-responsive">
                        <div  style="padding-right:17px">
                            <table class="table table-striped">
                                <tr>
                                    <th width="10%" style="color: red">排名</th>
                                    <th width="10%">姓名</th>
                                    <th width="40%">所属学校</th>
                                    <th width="20%">VIP编号</th>
                                    <th width="10%" style="color: red">分数</th>
                                    <th width="10%">操作</th>
                                </tr>
                            </table>
                        </div>
                        <div style="width:100%;height:600px;overflow:auto; border-bottom:1px solid #dddddd">
                            <table class="table table-striped">
                                <tbody>
                                {volist name="list" id="vo"}
                                    {notempty name="vo.id"}
                                    <tr>
                                        <td width="10%" style="color: red">{$i}</td>
                                        <td width="10%">{$vo.name}</td>
                                        <td width="40%">{$vo.school_id|get_school}</td>
                                        <td width="20%">{$vo.order_id}</td>
                                        <td width="10%" style="color: red">{$vo.score}</td>
                                        <td width="10%"><a href="{:Url('Test/del?id='.$vo['id'])}" class="confirm ajax-del">删除</a></td>
                                    </tr>
                                    {/notempty}
                                {/volist}
                                </tbody>
                            </table>
                        </div>
                        <tfoot>
                        <tr>
                            <td colspan="10">
                            </td>
                        </tr>
                        </tfoot>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<iframe id="iframe" src="" style="height: 80%;width: 392px;z-index: 99;position: absolute;top: 10%;border: 0;left: 32%;background: #fff;display: none;" scrolling="auto" seamless></iframe>
<div class="shadow" style="display: none"></div>
{/block}

{block name="script"}
<script src="/admin/js/plugins/iCheck/icheck.min.js"></script>
<script>
    highlight_subnav("{:Url('Test/index')}");
    $(document).ready(function(){
        $('.i-checks').iCheck({
            checkboxClass: 'icheckbox_square-green',
            radioClass: 'iradio_square-green',
        });
    });
</script>
{/block}